<include file="public:header"/>

<div class='container-fluid mt40'>
    <form action="{:U('user/ajax_save_address')}" method="post" id="addressFrom">
        <div class="row global-top ">
            <div class="col-xs-2">
                <a class="return" href="Javascript:history.go(-1)"></a>
            </div>
            <div class="col-xs-8">
                <div class="text">
                    <if condition="ACTION_NAME eq 'edit_address'">
                        编辑收货地址
                        <else/>
                        新增收货地址
                    </if>
                </div>
            </div>
            <div class="col-xs-2" style="padding:0;">
            </div>
        </div>
        <div class="row white-bg">
            <div class="form-list">
                <div class="col-xs-3 name">收&nbsp;&nbsp;货&nbsp;&nbsp;人</div>
                <div class="col-xs-9 input-text">
                    <div class="change-dress">
                        <input type="text"
                               name="name"
                               placeholder="收货人姓名"
                               data-rule-required="true"
                               value="{$info.name}"
                        />
                    </div>
                </div>
            </div>
            <div class="form-list">
                <div class="col-xs-3 name">手机号码</div>
                <div class="col-xs-9 input-text">
                    <div class="change-dress">
                        <input type="text"
                               name="tele"
                               maxlength="11"
                               minlength="11"
                               placeholder="手机号码"
                               data-rule-required="true"
                               value="{$info.tele}"
                        />
                    </div>
                </div>
            </div>

            <div class="form-list">
                <div class="col-xs-3 name">邮政编码</div>
                <div class="col-xs-9 input-text">
                    <div class="change-dress">
                        <input type="text"
                               name="zipcode"
                               maxlength="6"
                               minlength="6"
                               placeholder="邮政编码"
                               data-rule-required="true"
                               value="{$info.zipcode}"/>
                    </div>
                </div>
            </div>

            <div class="form-list">
                <div class="col-xs-3 name">所在地区</div>
                <div class="col-xs-9 input-text">
                    <div class="change-dress" id="addressAjaxBox">
                        <select data-for="province">
                            <option value="">省份</option>
                            <volist name="drr0_list" id="val">
                                <option value="{$val.id}" <if condition="$address[0][id] eq $val[id]">selected</if>>{$val.name}</option>
                            </volist>
                        </select>
                        <select data-for="city">
                            <option value="">市</option>
                            <volist name="drr1_list" id="val">
                                <option value="{$val.id}" <if condition="$address[1][id] eq $val[id]">selected</if>>{$val.name}</option>
                            </volist>
                        </select>
                        <select data-for="area">
                            <option value="">区</option>
                            <volist name="drr2_list" id="val">
                                <option value="{$val.id}" <if condition="$address[2][id] eq $val[id]">selected</if>>{$val.name}</option>
                            </volist>
                        </select>
                    </div>
                    <input type="hidden" name="province" value="{$address[0][name]}">
					<input type="hidden" name="city" value="{$address[1][name]}">
					<input type="hidden" name="area" value="{$address[2][name]}">
                </div>
            </div>

            <div class="form-list">
                <div class="col-xs-3 name">详细地址</div>
                <div class='col-xs-9 input-text'>
                    <div class="change-dress">
                        <input type="text"
                               name="address"
                               placeholder="详细地址"
                               data-rule-required="true"
                               value="{$info.address}"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="row form-list mt20">
            <div class="col-xs-1"></div>
            <div class="col-xs-10">
                <input type="submit" value="保存" class="submit-btn js-submit-btn"/>
                <input type="hidden" name="ret_url" value="{:urldecode($_GET['ret_url'])}"/>
                <input type="hidden" name="id" value="{$info.id}"/>
                <input type="hidden" name="page_type" value="{$page_type}"/>
            </div>
            <div class="col-xs-1"></div>
        </div>
    </form>
</div>
<include file="public:footer"/>